/* =========================
   Base Styles & Variables
   ========================= */
:root {
    --primary-blue: #0000FF;
    --dark: #181818;
    --light: #f8f9fa;
    --gray: #e0e0e0;
    --transition: 0.3s cubic-bezier(.4,0,.2,1);
    --radius: 8px;
    --shadow: 0 4px 24px rgba(0,0,0,0.08);
    --max-width: 1200px;
    --footer-bg: #000000;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Arial', sans-serif;
    margin: 0;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

/* =========================
   Header & Navigation
   ========================= */
.top-bar {
    background: var(--primary-blue);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 2vw;
    font-size: 0.95rem;
}

.top-bar .contact-info span {
    margin-right: 1.5rem;
}

.top-bar .social-icons a {
    color: #fff;
    margin-left: 1rem;
    transition: color var(--transition);
}

.top-bar .social-icons a:hover {
    color: #ffd700;
}

.navbar {
    background: #fff;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 2vw;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo a {
    color: var(--primary-blue);
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    letter-spacing: 1px;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    color: var(--dark);
    text-decoration: none;
    padding: 0.7rem 1.2rem;
    font-weight: 500;
    transition: color var(--transition);
    border-radius: var(--radius);
}

.nav-links a:hover,
.nav-links .btn-devis {
    color: #fff;
    background: var(--primary-blue);
}

.btn-devis {
    margin-left: 1rem;
    font-weight: bold;
    border-radius: var(--radius);
    transition: background var(--transition);
}

.dropdown .dropbtn {
    display: flex;
    align-items: center;
    gap: 0.3em;
}

.dropdown-content {
    display: none;
    position: absolute;
    background: #fff;
    min-width: 320px; /* Increased for better visualization of long service names */
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    top: 100%;
    left: 0;
    z-index: 10;
    flex-direction: column;
    padding: 0.5rem 0;
}

.dropdown-content li {
    width: 100%;
}

.dropdown-content a {
    color: var(--dark);
    padding: 0.7rem 1.2rem;
    display: block;
    border-radius: 0;
    background: none;
}

.dropdown-content a:hover {
    background: var(--primary-blue);
    color: #fff;
}

.dropdown:hover .dropdown-content { display: flex; }

.dropdown.open .dropdown-content {
    display: flex;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    font-size: 1.7rem;
    color: var(--primary-blue);
    cursor: pointer;
}

/* Navbar logo image */
.navbar-logo {
    display: block;
    max-height: 48px;
    width: auto;
    object-fit: contain;
}

/* =========================
   Diaporama / Hero Section
   ========================= */
.diaporama {
    position: relative;
    width: 100%;
    height: 60vh;
    min-height: 350px;
    background: var(--gray);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slides {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s var(--transition);
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide.active {
    opacity: 1;
    z-index: 2;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6);
}

.slide-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    text-align: center;
    z-index: 3;
    width: 90%;
    max-width: 700px;
}

.slide-overlay h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.slide-overlay p {
    font-size: 1.2rem;
    text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.diapo-dots {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.7em;
    z-index: 10;
}

.diapo-dots .dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #fff;
    opacity: 0.6;
    cursor: pointer;
    transition: background var(--transition), opacity var(--transition);
    border: 2px solid var(--primary-blue);
}

.diapo-dots .dot.active {
    background: var(--primary-blue);
    opacity: 1;
}

/* Diaporama button style */
.diapo-btn {
    display: inline-block;
    margin-top: 1.5rem;
    margin-bottom: 2.5rem; /* Add space below button to avoid overlap with dots */
    padding: 0.8rem 2.2rem;
    background: var(--primary-blue);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    text-decoration: none;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    cursor: pointer;
}
.diapo-btn:hover {
    background: #2222ff;
    color: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.13);
}

/* =========================
   Services Section
   ========================= */
.services-section {
    max-width: var(--max-width);
    margin: 3rem auto;
    padding: 0 2vw;
    text-align: center;
}

.services-section h2 {
    color: var(--primary-blue);
    font-size: 2.2rem;
    margin-bottom: 2rem;
}

.services-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
}

.service-card {
    flex: 1; /* prend toute la hauteur possible */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* équilibre contenu */
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem 1.5rem;
    min-height: 260px;
    transition: transform var(--transition), box-shadow var(--transition), color var(--transition);
    opacity: 0;
    transform: translateY(40px);
    will-change: transform, opacity;
}

.service-card i {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 1rem;
    transition: color 0.4s var(--transition), transform 0.4s var(--transition);
}

.service-card:hover {
    transform: scale(1.06) translateY(-8px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.13);
    z-index: 2;
}

.service-card:hover i {
    color: #2222ff;
    transform: scale(1.18) rotate(-6deg);
}

.service-card h3 {
    margin: 0.5rem 0 1rem 0;
    font-size: 1.2rem;
    color: var(--dark);
}

.service-card p {
    color: #444;
    font-size: 1rem;
}

/* Reveal animation for cards */
.service-card.reveal.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s var(--transition), transform 0.7s var(--transition);
}

/* Service cards as links */
.services-cards a.service-card {
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
    transition: box-shadow 0.3s, transform 0.3s;
}
.services-cards a.service-card:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
    z-index: 2;
}
.services-cards a.service-card:hover,
.services-cards a.service-card:active {
    box-shadow: 0 12px 32px rgba(0,0,0,0.13), 0 0 0 2px var(--primary-blue);
    transform: translateY(-6px) scale(1.03);
    text-decoration: none;
    color: inherit;
}

/* =========================
   Footer
   ========================= */
footer {
    background: var(--footer-bg);
    color: #fff;
    padding: 2.5rem 0 0.5rem 0;
    margin-top: 3rem;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
    justify-content: space-between;
    padding: 0 2vw;
}

.footer-logo-desc {
    flex: 1 1 250px;
    min-width: 220px;
    margin-bottom: 1.5rem;
}

.footer-logo {
    width: 160px;
    height: auto;
    margin-bottom: 1rem;
    background: #fff;
    border-radius: var(--radius);
    object-fit: contain;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
    border: 2px solid #e0e0e0;
    padding: 8px 16px;
    display: block;
}

.footer-services {
    flex: 1 1 220px;
    min-width: 200px;
    margin-bottom: 1.5rem;
}

.footer-services h4 {
    margin-bottom: 1rem;
    color: #fff;
}

.services-columns {
    display: flex;
    gap: 1rem;
}

.services-columns ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.services-columns li {
    margin-bottom: 0.7rem;
    font-size: 1rem;
}

.footer-contact {
    flex: 1 1 280px;
    min-width: 220px;
    margin-bottom: 1.5rem;
}

.footer-contact h4 {
    margin-top: 1.2rem;
    margin-bottom: 0.7rem;
    color: #fff;
}

.footer-contact p {
    margin: 0.3rem 0;
    font-size: 1rem;
}

.map-container {
    width: 100%;
    height: 120px;
    margin: 0.7rem 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.footer-bottom {
    text-align: center;
    color: #bbb;
    font-size: 0.95rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #333;
}

.footer-quicklinks ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.footer-quicklinks li {
    margin-bottom: 0.7rem;
    font-size: 1rem;
}
.footer-quicklinks a {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s, text-decoration 0.2s;
}
.footer-quicklinks a:hover {
    text-decoration: underline;
    color: #ffd700;
}

/* Remove list effect from dropdown services menu */
.dropdown-content {
    padding: 0.5rem 0;
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    background: #fff;
}
.dropdown-content li {
    list-style: none;
    margin: 0;
    padding: 0;
    background: none;
}
.dropdown-content a {
    color: var(--dark);
    padding: 0.7rem 1.2rem;
    display: block;
    border-radius: 0;
    background: none;
    transition: background var(--transition), color var(--transition);
}
.dropdown-content a:hover {
    background: var(--primary-blue);
    color: #fff;
}

/* =========================
   Responsive Design
   ========================= */
@media (max-width: 1024px) {
    .footer-container {
        flex-direction: column;
        gap: 0rem;
        align-items: flex-start;
    }
    .services-cards {
        gap: 1.2rem;
    }
}

@media (max-width: 800px) {
    .services-cards {
        flex-direction: column;
        align-items: center;
    }
    .service-card {
        width: 90%;
        min-width: 220px;
    }
    .footer-logo {
        width: 110px;
    }
}

@media (max-width: 700px) {
    .services-columns {
    display: flex;
    gap: 0;
    flex-direction: column;
    }
    .footer-logo-desc {
    flex: 1 1 100px;
    min-width: 220px;
    margin-bottom: 0;
    }
    .footer-container {
        flex-direction: column;
        gap: 0rem;
        align-items: flex-start;
    }
  .navbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.7rem 4vw;
    position: relative;
  }

  .menu-toggle {
    display: block;
    font-size: 1.7rem;
    color: var(--primary-blue);
    cursor: pointer;
    position: absolute;
    right: 2vw;
    top: 1.1rem;
  }

  .nav-links {
    display: none; /* caché par défaut */
    flex-direction: column;
    width: 100%;
    background: #fff;
    gap: 0.7rem;
    padding-top: 1rem;
  }

  .nav-links.open {
    display: flex; /* affiché si on ajoute la classe .open */
  }

  .nav-links li {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .nav-links a {
    width: 100%;
    padding: 1.2rem 2vw;
    box-sizing: border-box;
  }

  .nav-links .btn-devis {
    margin-top: 0.5rem;
    margin-left: 0;
    width: 95%;
    display: block;
    text-align: center;
  }

  .dropdown-content {
    position: static;
    box-shadow: none;
    min-width: 100%;
  }
}


@media (max-width: 500px) {
    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        font-size: 0.9rem;
        padding: 0.3rem 4vw;
    }
    .footer-logo {
        width: 90px;
    }
    .slide-overlay h1 {
        font-size: 1.3rem;
    }
    .slide-overlay p {
        font-size: 1rem;
    }
}



/* =========================
   footer centering for mobile
   ========================= */

@media (max-width: 700px) {
    .footer-logo {
        margin: auto;
        width: 50%;
    }
    .footer_p_center{
        text-align: center;
        margin: auto;
        width: auto;
    }
}

/* =========================
   end of footer centering for mobile 
   ========================= */


.footer-services ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.footer-services li {
    margin-bottom: 0.7rem;
    font-size: 1rem;
}
.footer-services li,
.footer-services a {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s, text-decoration 0.2s;
}
.footer-services li:hover,
.footer-services a:hover {
    text-decoration: underline;
    color: #ffd700;
}

/* =========================
   Fixed Contact Buttons
   ========================= */
.fixed-contact-buttons {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 1000;
}

.fixed-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    text-decoration: none;
    color: white;
    font-size: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.fixed-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.fixed-btn:active {
    transform: translateY(-1px) scale(1.02);
}

/* WhatsApp Button */
.whatsapp-btn {
    background: linear-gradient(135deg, #25D366, #128C7E);
    animation: pulse-whatsapp 2s infinite;
}

.whatsapp-btn:hover {
    background: linear-gradient(135deg, #128C7E, #075E54);
}

@keyframes pulse-whatsapp {
    0% { box-shadow: 0 8px 24px rgba(37, 211, 102, 0.3); }
    50% { box-shadow: 0 8px 24px rgba(37, 211, 102, 0.6); }
    100% { box-shadow: 0 8px 24px rgba(37, 211, 102, 0.3); }
}

/* Phone Button */
.phone-btn {
    background: linear-gradient(135deg, var(--primary-blue), #1e3a8a);
    animation: pulse-phone 2s infinite 0.5s;
}

.phone-btn:hover {
    background: linear-gradient(135deg, #1e3a8a, #1e40af);
}

@keyframes pulse-phone {
    0% { box-shadow: 0 8px 24px rgba(0, 0, 255, 0.3); }
    50% { box-shadow: 0 8px 24px rgba(0, 0, 255, 0.6); }
    100% { box-shadow: 0 8px 24px rgba(0, 0, 255, 0.3); }
}

/* Devis Button */
.devis-btn {
    background: linear-gradient(135deg, #ffd700, #e6c200);
    color: var(--dark);
    animation: pulse-devis 2s infinite 1s;
}

.devis-btn:hover {
    background: linear-gradient(135deg, #e6c200, #d4af37);
}

@keyframes pulse-devis {
    0% { box-shadow: 0 8px 24px rgba(255, 215, 0, 0.3); }
    50% { box-shadow: 0 8px 24px rgba(255, 215, 0, 0.6); }
    100% { box-shadow: 0 8px 24px rgba(255, 215, 0, 0.3); }
}

/* Tooltip */
.btn-tooltip {
    position: absolute;
    right: 70px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.btn-tooltip::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 5px solid rgba(0, 0, 0, 0.8);
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}

.fixed-btn:hover .btn-tooltip {
    opacity: 1;
    visibility: visible;
    right: 75px;
}

/* Responsive Design for Fixed Buttons */
@media (max-width: 768px) {
    .fixed-contact-buttons {
        bottom: 1rem;
        right: 1rem;
        gap: 0.8rem;
    }
    
    .fixed-btn {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    .btn-tooltip {
        display: none;
    }
}

@media (max-width: 480px) {
    .fixed-contact-buttons {
        bottom: 0.8rem;
        right: 0.8rem;
        gap: 0.6rem;
    }
    
    .fixed-btn {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
}

.top-bar .contact-link {
    display: inline-flex;
    align-items: center;
    color: #fff;
    text-decoration: none;
    margin-right: 1.5rem;
    font-size: 0.95rem;
    transition: color 0.2s, text-decoration 0.2s;
}
.top-bar .contact-link:last-child {
    margin-right: 0;
}
.top-bar .contact-link i {
    margin-right: 0.4em;
    font-size: 1em;
}
.top-bar .contact-link:hover,
.top-bar .contact-link:focus {
    color: #ffd700;
    text-decoration: underline;
    outline: none;
}

/* Spécifique : liens contact-link dans le footer */
footer .contact-link {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s, text-decoration 0.2s;
}
footer .contact-link:hover,
footer .contact-link:focus {
    color: #ffd700;
    text-decoration: underline;
    outline: none;
}

.footer-logo-link {
    display: inline-block;
}
.footer-logo-link:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}
.footer-brand-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s, text-decoration 0.2s;
}
.footer-brand-link:hover,
.footer-brand-link:focus {
    color: var(--primary-blue);
    text-decoration: underline;
    outline: none;
}


.flex-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}
.container {
    width: calc(25% - 1rem);
    box-sizing: border-box;
    display: flex; /* important */
    flex-direction: column;
}
@media (max-width: 700px) {
  .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: auto;
  }
}
@media (max-width: 992px) {
  .container {
    align-items: center;
    width: calc(50% - 1rem);
  }
}
@media (max-width: 600px) {
  .container {
    align-items: center;
    width: 100%;
  }
}